1. Field of the Invention
The present invention relates to a pulse signal generation device which outputs a predetermined number of pulses during a period of one cycle of such a signal having a prescribed frequency as a vertical synchronizing signal for use in video control.
2. Description of the Related Art
Consideration will be given to generation of a pulse signal having a fixed number of pulses oscillating during a period of one cycle of a signal S1 having a fixed cycle as shown in FIG. 14. In a case where a pulse signal S2 is to be output on the basis of the signal S1 of a fixed cycle as illustrated in the figure, a cycle of a pulse to be output (duty: 50%) will be obtained by the following calculation expression (1): ##EQU1## In this formula, T1 represents cycle of signal S1, Np represents the number of pulses of pulse signal S2 output in one cycle of signal S1.
Assuming, for example, that a cycle of the signal S1 is 10 ms and the number of pulses of the pulse signal S2 during the period of one cycle of the signal S1 is four, a half cycle time of one pulse will be expressed as follows: ##EQU2## Description will be next made of program operation for controlling the number of pulses of a pulse signal during a period of one cycle of the above-described signal of a fixed cycle. In this case, the pulse signal is output by external interruption processing executed on an edge of the signal of a fixed cycle and timer interruption processing started every half cycle of the pulse signal.
FIG. 15 is a block diagram showing specific hardware structure for use in the present operation example. A pulse signal generation device 1500 shown in FIG. 15 includes a clock dividing circuit 1501 for dividing a clock signal oscillated from an external vibrator 1510, a timer count register 1502 for counting the number of clocks in a fixed time period of a divided clock signal output from the clock dividing circuit 1501, an edge detection circuit 1504 for detecting an edge of an externally applied input signal S150 of a fixed cycle, and a timer compare register 1503 for setting a pulse width of a pulse signal to be output.
FIG. 16 is a flow chart showing external interruption processing using the above-described pulse signal generation device 1500, while FIG. 17 is a flow chart showing timer interruption processing using the above-described pulse signal generation device 1500. FIG. 18 is a timing chart showing operation timing for outputting a pulse signal. Start timing of the processing by the pulse signal generation device 1500 falls on a leading edge of the externally applied signal S150 of a fixed cycle.
First at the external interruption processing shown in FIG. 16, obtain a pulse width arbitrarily predetermined for a pulse signal to be output (Step 1601) to set a value of the obtained pulse width to the timer compare register 1503 (Step 1602). Next, start outputting a pulse signal (step 1603) to start the timer (Step 1604). Then, authorize the timer interruption processing of a pulse output to finish the processing (Step 1605). Thereafter, after a lapse of a half cycle of the output pulse, the timer interruption processing shown in FIG. 17 starts.
In the timer interruption processing, first invert an output level of the pulse signal (Step 1701) to determine whether outputting of the pulse signal is to be finished or not (Step 1702). For continuing outputting of the pulse signal, set the next timer interruption time to finish the processing (Step 1703). On the other hand, for finishing outputting of the pulse signal, set timer interruption to be inhibited to finish the processing (Step 1704).
Description will be next made of the application of the above-described conventional pulse signal generation device to a lens control device of a video camera as an example. First, a stepping motor control method will be described. FIG. 19 is a block diagram showing structure of a control device for a stepping motor, while FIG. 20 is a timing chart showing a signal for driving the stepping motor. A microcomputer 1901 shown in FIG. 19 realizes each function of the pulse signal generation device 1500 shown in FIG. 15 by program control.
The microcomputer 1901 receives input of a vertical synchronizing signal S190 to output a stepping motor driving pulse signal S191, a stepping motor direction control signal S192 and a stepping motor drive authorization signal S193 to a stepping motor control IC 1902. The stepping motor driving IC 1902 outputs a stepping motor driving signal S194 composed of signals of one phase to four phases in response to each control signal sent from the microcomputer 1901. The stepping motor control IC 1902 controls drive of the stepping motor 1903 by changing an output level of the stepping motor driving signal S194 at each one pulse of the stepping motor driving pulse signal S191 sent from the microcomputer 1901.
Description will be next made of output operation of the stepping motor driving pulse signal S191 by the microcomputer 1901 for the lens control of a video camera as an example. On the microcomputer 1901 for controlling the video camera, software runs on the basis of the vertical synchronizing signal S190 for the convenience of image data processing. The microcomputer 1901 makes determination of information regarding focus every one cycle of the vertical synchronizing signal S1901 to control a focus lens in order to bring picture into focus. Also at the operation of a zoom lens, the microcomputer conducts control on the basis of the vertical synchronizing signal S190 because single operation of the zoom lens causes picture to come out of focus and therefore the zoom lens should be operated in tune with a focus lens.
Description will be here made of a case where an error occurs in a system clock of the microcomputer 1901. The system clock of the microcomputer 1901 (signal S1 of a fixed cycle) develops an error in a prescribed frequency of a vibrator due to a change in temperature and variation of performance of the vibrator. When an error is developed so as to increase a time of one cycle of the system clock S1 of the microcomputer 1901, the last output time of the pulse signal S2 shortens as shown in FIG. 21. To the contrary, when an error is developed so as to shorten a time of one cycle of the system clock S1, the last output time of the pulse signal S2 elongates as shown in FIG. 22.
Next, description will be made of driving times of a zoom motor and a focus motor. At the focusing by the operation of a focus lens, in general, when the degree of out-of-focus is high, the lens is moved to a large extent for quick focusing and when the degree of out-of-focus is low, the lens is moved slowly for focusing. Relationship between manipulation of a zoom lens and operation of the zoom lens by a zoom lever will be described in detail with reference to FIG. 23. It is assumed that a state of a zoom lever leaning toward none of the directions is referred to as neutral and that the zoom lens is shifted to a telephoto (TELE) mode or a wide angle (WIDE) mode by leaning the zoom lever to a preset direction. Leaning the zoom lever to a given direction to a large extent results in moving the zoom lens quickly to the TELE or WIDE mode and leaning the same to a small extent results in moving the lens slowly.
To move the zoom lens quickly, the number of pulses of a stepping motor driving pulse signal for a stepping motor of a zoom motor is increased which is to be output in one cycle time of the vertical synchronizing signal S190 (FIG. 24). To the contrary, to move the lens slowly, the number of pulses of the stepping motor driving pulse signal is decreased which is to be output in one cycle time of the vertical synchronizing signal S190 (FIG. 25). At the zoom motor, as the rate of error in a pulse oscillation interval of a stepping motor driving pulse signal is increased, a generated driving sound is increased. Therefore, as shown in FIG. 24, moving the zoom lens quickly will increase the rate of error in a pulse oscillation interval of the stepping motor driving pulse signal, resulting in generating a big driving sound. To the contrary, as shown in FIG. 25, moving the zoom lens slowly decreases the rate of error in a pulse oscillation interval of the stepping motor driving pulse signal, resulting in generating a relatively little driving sound.
As described in the foregoing, since a conventional pulse signal generation device develops an error in a system clock of a microcomputer due to a change in temperature and difference in performance of a vibrator itself, the device is incapable of generating an accurate pulse signal.
At the control of drive of a stepping motor, for example, because a stepping motor driving pulse signal as a relevant pulse signal contains an error, the stepping motor can not be driven accurately.
Also when the stepping motor is run at a high speed, a pulse width of the stepping motor driving pulse signal shortens to increase the rate of error in a pulse width, resulting in increasing the rate of error of a vibrator with respect to the stepping motor driving pulse signal. Driving sound of the stepping motor is therefore increased.
As the driving sound of the stepping motor is increased, the driving sound of the stepping motor will be recorded as noise during the picture recording by a video camera.